In order to support scripting, you must implement a subclass of the class ODSemanticInterface. This PartMaker document contains the ingredients for a simple subclass of ODSemanticInterface. If will generate everything you need: the .idl, .cpp, .xih and .xh files.
This subclass doesn't do anything. In fact, it simply returns the appopriate error codes when any of its methods are called (aside from the initialization and destruction methods). However, the methods contain lots of good boilerplate code and comments as to how to implement the method.
A simple subclass of ODSemanticInterface is appopriate when you are only implementing just a little scripting functionality in your part. If you are doing a full-blown scripting implementation, you may wish to look at the class ODCPlusSemanticInterface. This class provides a dispatcher that allows you to install callback procedures much in the same way that you would use the functions of the Apple event manager such as AEInstallEventHandler.
The root of the class name is "SemtIntf", but by typing in a unique string when the PartMaker dialog comes up, your class name will be <your input>_SemtIntf.